home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / zip21x2.zip / ZIP.DOC < prev    next >
Text File  |  1996-04-27  |  34KB  |  859 lines

  1.  
  2.  
  3.  
  4. ZIP(1L)                                                   ZIP(1L)
  5.  
  6.  
  7. NAME
  8.        zip,  zipcloak,  zipnote,  zipsplit - package and compress
  9.        (archive) files
  10.  
  11. SYNOPSIS
  12.        zip  [-AcdDeEfFghjklLmoqrSTuvVwXyz@$]  [-b path]  [-n suf-
  13.        fixes]   [-t mmddyy]   [   zipfile  [  file1  file2  ...]]
  14.        [-xi list]
  15.  
  16.        zipcloak [-dhL] [-b path] zipfile
  17.  
  18.        zipnote [-hwL] [-b path] zipfile
  19.  
  20.        zipsplit [-hiLpst] [-n size] [-b path] zipfile
  21.  
  22. DESCRIPTION
  23.        zip is a compression and file packaging utility for  Unix,
  24.        VMS,  MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh.
  25.        It is analogous to a  combination  of  the  UNIX  commands
  26.        tar(1)  and compress(1) and is compatible with PKZIP (Phil
  27.        Katz's ZIP for MSDOS systems).
  28.  
  29.        A companion program  (unzip(1L)),  unpacks  zip  archives.
  30.        The zip and unzip(1L) programs can work with archives pro-
  31.        duced by PKZIP,  and  PKZIP  and  PKUNZIP  can  work  with
  32.        archives  produced  by zip.  zip version 2.1 is compatible
  33.        with PKZIP 2.04.  Note that PKUNZIP  1.10  cannot  extract
  34.        files  produced  by  PKZIP  2.04  or zip 2.1. You must use
  35.        PKUNZIP 2.04g  or  unzip  5.0p1  (or  later  versions)  to
  36.        extract them.
  37.  
  38.        For a brief help on zip and unzip, run each without speci-
  39.        fying any parameters on the command line.
  40.  
  41.        The program is useful for packaging a  set  of  files  for
  42.        distribution;  for  archiving  files;  and for saving disk
  43.        space by temporarily compressing unused files or  directo-
  44.        ries.
  45.  
  46.        The  zip  program puts one or more compressed files into a
  47.        single zip archive, along with information about the files
  48.        (name,  path, date, time of last modification, protection,
  49.        and check  information  to  verify  file  integrity).   An
  50.        entire  directory  structure  can  be  packed  into  a zip
  51.        archive with a single command.  Compression ratios of  2:1
  52.        to 3:1 are common for text files.  zip has one compression
  53.        method (deflation) and can also store files  without  com-
  54.        pression.  zip automatically chooses the better of the two
  55.        for each file to be compressed.
  56.  
  57.        When given the name of an existing zip archive,  zip  will
  58.        replace  identically  named  entries in the zip archive or
  59.        add entries for new names.  For example, if foo.zip exists
  60.        and  contains  foo/file1  and foo/file2, and the directory
  61.  
  62.  
  63.  
  64.                            13 Apr 1996                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZIP(1L)                                                   ZIP(1L)
  71.  
  72.  
  73.        foo contains the files foo/file1 and foo/file3, then:
  74.  
  75.               zip -r foo foo
  76.  
  77.        will replace foo/file1 in foo.zip  and  add  foo/file3  to
  78.        foo.zip.    After   this,   foo.zip   contains  foo/file1,
  79.        foo/file2, and foo/file3, with  foo/file2  unchanged  from
  80.        before.
  81.  
  82.        If the file list is specified as -@, zip takes the list of
  83.        input files from standard input.  Under UNIX, this  option
  84.        can  be  used  to  powerful effect in conjunction with the
  85.        find(1) command.  For example, to archive all the C source
  86.        files in the current directory and its subdirectories:
  87.  
  88.               find . -name "*.[ch]" -print | zip source -@
  89.  
  90.        (note  that  the  pattern must be quoted to keep the shell
  91.        from expanding it).  zip will also accept  a  single  dash
  92.        ("-")  as  the  zip file name, in which case it will write
  93.        the zip file to standard output, allowing the output to be
  94.        piped to another program. For example:
  95.  
  96.               zip -r - . | dd of=/dev/nrst0 obs=16k
  97.  
  98.        would  write  the  zip  output directly to a tape with the
  99.        specified block size for the purpose  of  backing  up  the
  100.        current directory.
  101.  
  102.        zip also accepts a single dash ("-") as the name of a file
  103.        to be compressed, in which case it will read the file from
  104.        standard  input,  allowing  zip to take input from another
  105.        program. For example:
  106.  
  107.               tar cf - . | zip backup -
  108.  
  109.        would compress the output of the tar command for the  pur-
  110.        pose  of  backing up the current directory. This generally
  111.        produces better  compression  than  the  previous  example
  112.        using  the  -r  option,  because zip can take advantage of
  113.        redundancy between files. The backup can be restored using
  114.        the command
  115.  
  116.               unzip -p backup | tar xf -
  117.  
  118.        When  no zip file name is given and stdout is not a termi-
  119.        nal, zip acts as a filter, compressing standard  input  to
  120.        standard output.  For example,
  121.  
  122.               tar cf - . | zip | dd of=/dev/nrst0 obs=16k
  123.  
  124.        is equivalent to
  125.  
  126.               tar cf - . | zip - - | dd of=/dev/nrst0 obs=16k
  127.  
  128.  
  129.  
  130.                            13 Apr 1996                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZIP(1L)                                                   ZIP(1L)
  137.  
  138.  
  139.        zip  archives created in this manner can be extracted with
  140.        the program funzip which is provided in the unzip package,
  141.        or  by  gunzip  which is provided in the gzip package. For
  142.        example:
  143.  
  144.        dd if=/dev/nrst0  ibs=16k | funzip | tar xvf -
  145.  
  146.        When changing an existing zip archive, zip  will  write  a
  147.        temporary file with the new contents, and only replace the
  148.        old one when the process of creating the new  version  has
  149.        been completed without error.
  150.  
  151.        If  the name of the zip archive does not contain an exten-
  152.        sion, the extension .zip is added.  If  the  name  already
  153.        contains  an extension other than .zip the existing exten-
  154.        sion is kept unchanged.
  155.  
  156. OPTIONS
  157.        -A     Adjust self-extracting executable archive.  A self-
  158.               extracting   executable   archive   is  created  by
  159.               prepending the SFX stub to an existing archive. The
  160.               -A  option  tells  zip  to adjust the entry offsets
  161.               stored in the archive to  take  into  account  this
  162.               "preamble" data.
  163.  
  164.        -b path
  165.               Use  the  specified  path  for  the  temporary  zip
  166.               archive. For example:
  167.  
  168.                      zip -b /tmp stuff *
  169.  
  170.               will put the temporary zip archive in the directory
  171.               /tmp,  copying over stuff.zip to the current direc-
  172.               tory when done. This option  is  only  useful  when
  173.               updating  an  existing archive, and the file system
  174.               containing this old archive does  not  have  enough
  175.               space  to hold both old and new archive at the same
  176.               time.
  177.  
  178.        -c     Add one-line comments for each file.   File  opera-
  179.               tions  (adding,  updating)  are done first, and the
  180.               user is then prompted for a  one-line  comment  for
  181.               each  file.   Enter the comment followed by return,
  182.               or just return for no comment.
  183.  
  184.        -d     Remove (delete) entries from a  zip  archive.   For
  185.               example:
  186.  
  187.                      zip -d foo foo/tom/junk foo/harry/\* \*.o
  188.  
  189.               will  remove  the  entry  foo/tom/junk,  all of the
  190.               files that start with foo/harry/, and  all  of  the
  191.               files  that  end  with .o (in any path).  Note that
  192.               shell pathname expansion has  been  inhibited  with
  193.  
  194.  
  195.  
  196.                            13 Apr 1996                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ZIP(1L)                                                   ZIP(1L)
  203.  
  204.  
  205.               backslashes,  so  that  zip  can see the asterisks,
  206.               enabling zip to match on the contents  of  the  zip
  207.               archive  instead  of  the  contents  of the current
  208.               directory.
  209.  
  210.               Under MSDOS, -d is case sensitive when  it  matches
  211.               names  in the zip archive.  This requires that file
  212.               names be entered in upper case if they were  zipped
  213.               by PKZIP on an MSDOS sys